import { getRequest, postRequest, putRequest } from '../utils/request'

export const requestTaskPage = params => {
  return getRequest('/job/list', params, false)
}

export const requestCustomerListPage = params => {
  return getRequest('/job/listByCustomer', params, false)
}

export const requestRunTask = params => {
  return postRequest('/job/run', params)
}

export const requestAddTask = params => {
  return postRequest('/job/add', params)
}

export const requestChangeStatus = params => {
  return postRequest('/job/changeStatus', params)
}

export const requestUpdateTask = params => {
  return putRequest('/job/edit', params)
}

export const requestDelTaskById = params => {
  return postRequest('/job/remove', params)
}

export const requestCheckCron = params => {
  return postRequest('/job/checkCronExpressionIsValid', params)
}
